<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__cryptolite__lld__mac__functions.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Functions<div class="ingroups"><a class="el" href="group__group__cryptolite.html">Cryptolite   (Cryptography)</a> &raquo; <a class="el" href="group__group__cryptolite__lld__mac.html">Message Authentication Code (HMAC, CMAC)</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaac94b8d67f4680a083849b65f99d670b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#gaac94b8d67f4680a083849b65f99d670b">Cy_Cryptolite_Cmac_Init</a> (CRYPTOLITE_Type *base, uint8_t const *key, <a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *cmacState, <a class="el" href="structcy__stc__cryptolite__aes__buffers__t.html">cy_stc_cryptolite_aes_buffers_t</a> *aesBuffers)</td></tr>
<tr class="memdesc:gaac94b8d67f4680a083849b65f99d670b"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function for initialization of CMAC operation.  <a href="#gaac94b8d67f4680a083849b65f99d670b">More...</a><br /></td></tr>
<tr class="separator:gaac94b8d67f4680a083849b65f99d670b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad56de504f9ee308f266f2c387957b6c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#gad56de504f9ee308f266f2c387957b6c5">Cy_Cryptolite_Cmac_Start</a> (CRYPTOLITE_Type *base, <a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *cmacState)</td></tr>
<tr class="memdesc:gad56de504f9ee308f266f2c387957b6c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts CMAC calculation.  <a href="#gad56de504f9ee308f266f2c387957b6c5">More...</a><br /></td></tr>
<tr class="separator:gad56de504f9ee308f266f2c387957b6c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga10110e926b2aaab977e04e79e03ee64d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#ga10110e926b2aaab977e04e79e03ee64d">Cy_Cryptolite_Cmac_Update</a> (CRYPTOLITE_Type *base, uint8_t const *message, uint32_t messageSize, <a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *cmacState)</td></tr>
<tr class="memdesc:ga10110e926b2aaab977e04e79e03ee64d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs cmac update for multi stage operation.  <a href="#ga10110e926b2aaab977e04e79e03ee64d">More...</a><br /></td></tr>
<tr class="separator:ga10110e926b2aaab977e04e79e03ee64d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae923b1de72c84f4b334ec5df658d0f19"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#gae923b1de72c84f4b334ec5df658d0f19">Cy_Cryptolite_Cmac_Finish</a> (CRYPTOLITE_Type *base, uint8_t *cmac, <a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *cmacState)</td></tr>
<tr class="memdesc:gae923b1de72c84f4b334ec5df658d0f19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Completes CMAC calculation.  <a href="#gae923b1de72c84f4b334ec5df658d0f19">More...</a><br /></td></tr>
<tr class="separator:gae923b1de72c84f4b334ec5df658d0f19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5b0adf870fe823da554de6953787396c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#ga5b0adf870fe823da554de6953787396c">Cy_Cryptolite_Cmac_Free</a> (CRYPTOLITE_Type *base, <a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *cmacState)</td></tr>
<tr class="memdesc:ga5b0adf870fe823da554de6953787396c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears CMAC operation context.  <a href="#ga5b0adf870fe823da554de6953787396c">More...</a><br /></td></tr>
<tr class="separator:ga5b0adf870fe823da554de6953787396c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93f1a0e4e94f15e08700f73d73e9ea24"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#ga93f1a0e4e94f15e08700f73d73e9ea24">Cy_Cryptolite_Cmac</a> (CRYPTOLITE_Type *base, uint8_t const *key, uint8_t const *message, uint32_t messageSize, uint8_t *cmac, <a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *cmacState)</td></tr>
<tr class="memdesc:ga93f1a0e4e94f15e08700f73d73e9ea24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs CMAC(Cipher-based Message Authentication Code) operation on a message to produce message authentication code using AES.  <a href="#ga93f1a0e4e94f15e08700f73d73e9ea24">More...</a><br /></td></tr>
<tr class="separator:ga93f1a0e4e94f15e08700f73d73e9ea24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab875d4c4c75ed427638cd0620010cbdb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#gab875d4c4c75ed427638cd0620010cbdb">Cy_Cryptolite_Hmac_Sha256_Init</a> (CRYPTOLITE_Type *base, <a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *cfContext)</td></tr>
<tr class="memdesc:gab875d4c4c75ed427638cd0620010cbdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function to initialize the HMAC operation.  <a href="#gab875d4c4c75ed427638cd0620010cbdb">More...</a><br /></td></tr>
<tr class="separator:gab875d4c4c75ed427638cd0620010cbdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga43f4d2a8acdd5cd91edb1447f1dd69cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#ga43f4d2a8acdd5cd91edb1447f1dd69cf">Cy_Cryptolite_Hmac_Sha256_Start</a> (CRYPTOLITE_Type *base, uint8_t const *key, uint32_t keyLength, <a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *cfContext)</td></tr>
<tr class="memdesc:ga43f4d2a8acdd5cd91edb1447f1dd69cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the initial Hash vector.  <a href="#ga43f4d2a8acdd5cd91edb1447f1dd69cf">More...</a><br /></td></tr>
<tr class="separator:ga43f4d2a8acdd5cd91edb1447f1dd69cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga07427f880d0be9706ab3aa244f993f34"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#ga07427f880d0be9706ab3aa244f993f34">Cy_Cryptolite_Hmac_Sha256_Update</a> (CRYPTOLITE_Type *base, uint8_t const *message, uint32_t messageSize, <a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *cfContext)</td></tr>
<tr class="memdesc:ga07427f880d0be9706ab3aa244f993f34"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the HMAC update on message.  <a href="#ga07427f880d0be9706ab3aa244f993f34">More...</a><br /></td></tr>
<tr class="separator:ga07427f880d0be9706ab3aa244f993f34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga903a1634c4aee19a657e7e446ad14f8e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#ga903a1634c4aee19a657e7e446ad14f8e">Cy_Cryptolite_Hmac_Sha256_Finish</a> (CRYPTOLITE_Type *base, uint8_t *hmac, <a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *cfContext)</td></tr>
<tr class="memdesc:ga903a1634c4aee19a657e7e446ad14f8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Completes the HMAC SHA256 calculation.  <a href="#ga903a1634c4aee19a657e7e446ad14f8e">More...</a><br /></td></tr>
<tr class="separator:ga903a1634c4aee19a657e7e446ad14f8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8b177687d857c3c0ef0756ee6803285c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#ga8b177687d857c3c0ef0756ee6803285c">Cy_Cryptolite_Hmac_Sha256_Free</a> (CRYPTOLITE_Type *base, <a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *cfContext)</td></tr>
<tr class="memdesc:ga8b177687d857c3c0ef0756ee6803285c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the used memory and context data.  <a href="#ga8b177687d857c3c0ef0756ee6803285c">More...</a><br /></td></tr>
<tr class="separator:ga8b177687d857c3c0ef0756ee6803285c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafa04cc27245c83173cfa78f0eb094832"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cryptolite__lld__mac__functions.html#gafa04cc27245c83173cfa78f0eb094832">Cy_Cryptolite_Hmac_Sha256_Run</a> (CRYPTOLITE_Type *base, uint8_t const *key, uint32_t keyLength, uint8_t const *message, uint32_t messageSize, uint8_t *hmac, <a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *cfContext)</td></tr>
<tr class="memdesc:gafa04cc27245c83173cfa78f0eb094832"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs the HMAC SHA256 function.  <a href="#gafa04cc27245c83173cfa78f0eb094832">More...</a><br /></td></tr>
<tr class="separator:gafa04cc27245c83173cfa78f0eb094832"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaac94b8d67f4680a083849b65f99d670b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaac94b8d67f4680a083849b65f99d670b">&#9670;&nbsp;</a></span>Cy_Cryptolite_Cmac_Init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Cmac_Init </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *&#160;</td>
          <td class="paramname"><em>cmacState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__aes__buffers__t.html">cy_stc_cryptolite_aes_buffers_t</a> *&#160;</td>
          <td class="paramname"><em>aesBuffers</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The function for initialization of CMAC operation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTOLITE instance.</td></tr>
    <tr><td class="paramname">key</td><td>The pointer to the CMAC key.</td></tr>
    <tr><td class="paramname">cmacState</td><td>The pointer to the AES state structure allocated by the user. The user must not modify anything in this structure.</td></tr>
    <tr><td class="paramname">aesBuffers</td><td>The buffers should be a SAHB mapped addresses. The pointer to the memory buffers storage.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> </dd></dl>

</div>
</div>
<a id="gad56de504f9ee308f266f2c387957b6c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad56de504f9ee308f266f2c387957b6c5">&#9670;&nbsp;</a></span>Cy_Cryptolite_Cmac_Start()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Cmac_Start </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *&#160;</td>
          <td class="paramname"><em>cmacState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts CMAC calculation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTOLITE instance.</td></tr>
    <tr><td class="paramname">cmacState</td><td>The pointer to the structure which stores the CMAC context.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> </dd></dl>

</div>
</div>
<a id="ga10110e926b2aaab977e04e79e03ee64d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga10110e926b2aaab977e04e79e03ee64d">&#9670;&nbsp;</a></span>Cy_Cryptolite_Cmac_Update()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Cmac_Update </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>messageSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *&#160;</td>
          <td class="paramname"><em>cmacState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs cmac update for multi stage operation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTOLITE instance.</td></tr>
    <tr><td class="paramname">message</td><td>The pointer to the message whose CMAC is being computed.</td></tr>
    <tr><td class="paramname">messageSize</td><td>The size of the message whose CMAC is being computed.</td></tr>
    <tr><td class="paramname">cmacState</td><td>The pointer to the structure which stores the CMAC context.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> </dd></dl>

</div>
</div>
<a id="gae923b1de72c84f4b334ec5df658d0f19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae923b1de72c84f4b334ec5df658d0f19">&#9670;&nbsp;</a></span>Cy_Cryptolite_Cmac_Finish()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Cmac_Finish </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>cmac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *&#160;</td>
          <td class="paramname"><em>cmacState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Completes CMAC calculation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTOLITE instance.</td></tr>
    <tr><td class="paramname">cmac</td><td>The pointer to the computed CMAC value.</td></tr>
    <tr><td class="paramname">cmacState</td><td>The pointer to the structure which stores the CMAC context.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> </dd></dl>

</div>
</div>
<a id="ga5b0adf870fe823da554de6953787396c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5b0adf870fe823da554de6953787396c">&#9670;&nbsp;</a></span>Cy_Cryptolite_Cmac_Free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Cmac_Free </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *&#160;</td>
          <td class="paramname"><em>cmacState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears CMAC operation context. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTOLITE instance.</td></tr>
    <tr><td class="paramname">cmacState</td><td>The pointer to the AES state structure allocated by the user. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> </dd></dl>

</div>
</div>
<a id="ga93f1a0e4e94f15e08700f73d73e9ea24"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga93f1a0e4e94f15e08700f73d73e9ea24">&#9670;&nbsp;</a></span>Cy_Cryptolite_Cmac()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Cmac </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>messageSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>cmac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__aes__state__t.html">cy_stc_cryptolite_aes_state_t</a> *&#160;</td>
          <td class="paramname"><em>cmacState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs CMAC(Cipher-based Message Authentication Code) operation on a message to produce message authentication code using AES. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTOLITE instance.</td></tr>
    <tr><td class="paramname">message</td><td>The pointer to a source plain text.</td></tr>
    <tr><td class="paramname">messageSize</td><td>The size of a source plain text.</td></tr>
    <tr><td class="paramname">key</td><td>The pointer to the encryption key.</td></tr>
    <tr><td class="paramname">cmac</td><td>The pointer to the calculated CMAC.</td></tr>
    <tr><td class="paramname">cmacState</td><td>The pointer to the AES state structure allocated by the user. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> </dd></dl>

</div>
</div>
<a id="gab875d4c4c75ed427638cd0620010cbdb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab875d4c4c75ed427638cd0620010cbdb">&#9670;&nbsp;</a></span>Cy_Cryptolite_Hmac_Sha256_Init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Hmac_Sha256_Init </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *&#160;</td>
          <td class="paramname"><em>cfContext</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The function to initialize the HMAC operation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the Cryptolite instance.</td></tr>
    <tr><td class="paramname">cfContext</td><td>The pointer to the <a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> structure that stores all internal variables for Cryptolite driver.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a></dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/* Key : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Key0[] = {0x6f,0x35,0x62,0x8d,0x65,0x81,0x34,0x35,0x53,0x4b,0x5d,0x67,0xfb,0xdb,0x54,0xcb,0x33,0x40,0x3d,0x04,0xe8,0x43,0x10,0x3e,0x63,0x99,0xf8,0x06,0xcb,0x5d,0xf9,0x5f,0xeb,0xbd,0xd6,0x12,0x36,0xf3,0x32,0x45};</div><div class="line"></div><div class="line"></div><div class="line">    <span class="comment">/* Message : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Msg0[]  = {0x75,0x2c,0xff,0x52,0xe4,0xb9,0x07,0x68,0x55,0x8e,0x53,0x69,0xe7,0x5d,0x97,0xc6,0x96,0x43,0x50,0x9a,0x5e,0x59,0x04,0xe0,0xa3,0x86,0xcb,0xe4,0xd0,0x97,0x0e,0xf7,0x3f,0x91,0x8f,0x67,0x59,0x45,0xa9,0xae,0xfe,0x26,0xda,0xea,0x27,0x58,0x7e,0x8d,0xc9,0x09,0xdd,0x56,0xfd,0x04,0x68,0x80,0x5f,0x83,0x40,0x39,0xb3,0x45,0xf8,0x55,0xcf,0xe1,0x9c,0x44,0xb5,0x5a,0xf2,0x41,0xff,0xf3,0xff,0xcd,0x80,0x45,0xcd,0x5c,0x28,0x8e,0x6c,0x4e,0x28,0x4c,0x37,0x20,0x57,0x0b,0x58,0xe4,0xd4,0x7b,0x8f,0xee,0xed,0xc5,0x2f,0xd1,0x40,0x1f,0x69,0x8a,0x20,0x9f,0xcc,0xfa,0x3b,0x4c,0x0d,0x9a,0x79,0x7b,0x04,0x6a,0x27,0x59,0xf8,0x2a,0x54,0xc4,0x1c,0xcd,0x7b,0x5f,0x59,0x2b,};</div><div class="line"></div><div class="line">    <span class="comment">/* Calculated HMAC-SHA-256*/</span></div><div class="line">    uint8_t hmac[<a class="code" href="group__group__cryptolite__macros.html#ga6d749f027df6aba958cdd1ec0cd4794b">CY_CRYPTOLITE_SHA256_HASH_SIZE</a>] = {0};</div><div class="line"></div><div class="line">    <a class="code" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> status;</div><div class="line">    <a class="code" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> hmac_ctx;</div><div class="line"></div><div class="line">    <span class="comment">/* MAC calculation */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#gab875d4c4c75ed427638cd0620010cbdb">Cy_Cryptolite_Hmac_Sha256_Init</a> (CRYPTOLITE, &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga43f4d2a8acdd5cd91edb1447f1dd69cf">Cy_Cryptolite_Hmac_Sha256_Start</a> (CRYPTOLITE, HMAC_SHA256_Vector0_Key0, <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Key0), &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga07427f880d0be9706ab3aa244f993f34">Cy_Cryptolite_Hmac_Sha256_Update</a> (CRYPTOLITE, &amp;HMAC_SHA256_Vector0_Msg0[0], 10u, &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga07427f880d0be9706ab3aa244f993f34">Cy_Cryptolite_Hmac_Sha256_Update</a> (CRYPTOLITE, &amp;HMAC_SHA256_Vector0_Msg0[10], <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Msg0)-10u, &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga903a1634c4aee19a657e7e446ad14f8e">Cy_Cryptolite_Hmac_Sha256_Finish</a> (CRYPTOLITE, hmac,  &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga8b177687d857c3c0ef0756ee6803285c">Cy_Cryptolite_Hmac_Sha256_Free</a> (CRYPTOLITE, &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga43f4d2a8acdd5cd91edb1447f1dd69cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga43f4d2a8acdd5cd91edb1447f1dd69cf">&#9670;&nbsp;</a></span>Cy_Cryptolite_Hmac_Sha256_Start()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Hmac_Sha256_Start </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>keyLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *&#160;</td>
          <td class="paramname"><em>cfContext</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the initial Hash vector. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTOLITE instance.</td></tr>
    <tr><td class="paramname">key</td><td>The pointer to the HMAC key.</td></tr>
    <tr><td class="paramname">keyLength</td><td>The length of the HMAC key.</td></tr>
  </table>
  </dd>
</dl>
<p>key The pointer to the HMAC key.</p>
<p>keyLength The length of the HMAC key.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cfContext</td><td>The pointer to the <a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> structure that stores all internal variables for Cryptolite driver.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a></dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/* Key : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Key0[] = {0x6f,0x35,0x62,0x8d,0x65,0x81,0x34,0x35,0x53,0x4b,0x5d,0x67,0xfb,0xdb,0x54,0xcb,0x33,0x40,0x3d,0x04,0xe8,0x43,0x10,0x3e,0x63,0x99,0xf8,0x06,0xcb,0x5d,0xf9,0x5f,0xeb,0xbd,0xd6,0x12,0x36,0xf3,0x32,0x45};</div><div class="line"></div><div class="line"></div><div class="line">    <span class="comment">/* Message : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Msg0[]  = {0x75,0x2c,0xff,0x52,0xe4,0xb9,0x07,0x68,0x55,0x8e,0x53,0x69,0xe7,0x5d,0x97,0xc6,0x96,0x43,0x50,0x9a,0x5e,0x59,0x04,0xe0,0xa3,0x86,0xcb,0xe4,0xd0,0x97,0x0e,0xf7,0x3f,0x91,0x8f,0x67,0x59,0x45,0xa9,0xae,0xfe,0x26,0xda,0xea,0x27,0x58,0x7e,0x8d,0xc9,0x09,0xdd,0x56,0xfd,0x04,0x68,0x80,0x5f,0x83,0x40,0x39,0xb3,0x45,0xf8,0x55,0xcf,0xe1,0x9c,0x44,0xb5,0x5a,0xf2,0x41,0xff,0xf3,0xff,0xcd,0x80,0x45,0xcd,0x5c,0x28,0x8e,0x6c,0x4e,0x28,0x4c,0x37,0x20,0x57,0x0b,0x58,0xe4,0xd4,0x7b,0x8f,0xee,0xed,0xc5,0x2f,0xd1,0x40,0x1f,0x69,0x8a,0x20,0x9f,0xcc,0xfa,0x3b,0x4c,0x0d,0x9a,0x79,0x7b,0x04,0x6a,0x27,0x59,0xf8,0x2a,0x54,0xc4,0x1c,0xcd,0x7b,0x5f,0x59,0x2b,};</div><div class="line"></div><div class="line">    <span class="comment">/* Calculated HMAC-SHA-256*/</span></div><div class="line">    uint8_t hmac[<a class="code" href="group__group__cryptolite__macros.html#ga6d749f027df6aba958cdd1ec0cd4794b">CY_CRYPTOLITE_SHA256_HASH_SIZE</a>] = {0};</div><div class="line"></div><div class="line">    <a class="code" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> status;</div><div class="line">    <a class="code" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> hmac_ctx;</div><div class="line"></div><div class="line">    <span class="comment">/* MAC calculation */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#gab875d4c4c75ed427638cd0620010cbdb">Cy_Cryptolite_Hmac_Sha256_Init</a> (CRYPTOLITE, &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga43f4d2a8acdd5cd91edb1447f1dd69cf">Cy_Cryptolite_Hmac_Sha256_Start</a> (CRYPTOLITE, HMAC_SHA256_Vector0_Key0, <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Key0), &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga07427f880d0be9706ab3aa244f993f34">Cy_Cryptolite_Hmac_Sha256_Update</a> (CRYPTOLITE, &amp;HMAC_SHA256_Vector0_Msg0[0], 10u, &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga07427f880d0be9706ab3aa244f993f34">Cy_Cryptolite_Hmac_Sha256_Update</a> (CRYPTOLITE, &amp;HMAC_SHA256_Vector0_Msg0[10], <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Msg0)-10u, &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga903a1634c4aee19a657e7e446ad14f8e">Cy_Cryptolite_Hmac_Sha256_Finish</a> (CRYPTOLITE, hmac,  &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga8b177687d857c3c0ef0756ee6803285c">Cy_Cryptolite_Hmac_Sha256_Free</a> (CRYPTOLITE, &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga07427f880d0be9706ab3aa244f993f34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga07427f880d0be9706ab3aa244f993f34">&#9670;&nbsp;</a></span>Cy_Cryptolite_Hmac_Sha256_Update()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Hmac_Sha256_Update </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>messageSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *&#160;</td>
          <td class="paramname"><em>cfContext</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs the HMAC update on message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTOLITE instance.</td></tr>
    <tr><td class="paramname">message</td><td>The address pointer to the message whose Hash is being computed.</td></tr>
    <tr><td class="paramname">messageSize</td><td>The size of the message whose Hash is being computed.</td></tr>
    <tr><td class="paramname">cfContext</td><td>The pointer to the <a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> structure that stores all internal variables for Cryptolite driver.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a></dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/* Key : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Key0[] = {0x6f,0x35,0x62,0x8d,0x65,0x81,0x34,0x35,0x53,0x4b,0x5d,0x67,0xfb,0xdb,0x54,0xcb,0x33,0x40,0x3d,0x04,0xe8,0x43,0x10,0x3e,0x63,0x99,0xf8,0x06,0xcb,0x5d,0xf9,0x5f,0xeb,0xbd,0xd6,0x12,0x36,0xf3,0x32,0x45};</div><div class="line"></div><div class="line"></div><div class="line">    <span class="comment">/* Message : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Msg0[]  = {0x75,0x2c,0xff,0x52,0xe4,0xb9,0x07,0x68,0x55,0x8e,0x53,0x69,0xe7,0x5d,0x97,0xc6,0x96,0x43,0x50,0x9a,0x5e,0x59,0x04,0xe0,0xa3,0x86,0xcb,0xe4,0xd0,0x97,0x0e,0xf7,0x3f,0x91,0x8f,0x67,0x59,0x45,0xa9,0xae,0xfe,0x26,0xda,0xea,0x27,0x58,0x7e,0x8d,0xc9,0x09,0xdd,0x56,0xfd,0x04,0x68,0x80,0x5f,0x83,0x40,0x39,0xb3,0x45,0xf8,0x55,0xcf,0xe1,0x9c,0x44,0xb5,0x5a,0xf2,0x41,0xff,0xf3,0xff,0xcd,0x80,0x45,0xcd,0x5c,0x28,0x8e,0x6c,0x4e,0x28,0x4c,0x37,0x20,0x57,0x0b,0x58,0xe4,0xd4,0x7b,0x8f,0xee,0xed,0xc5,0x2f,0xd1,0x40,0x1f,0x69,0x8a,0x20,0x9f,0xcc,0xfa,0x3b,0x4c,0x0d,0x9a,0x79,0x7b,0x04,0x6a,0x27,0x59,0xf8,0x2a,0x54,0xc4,0x1c,0xcd,0x7b,0x5f,0x59,0x2b,};</div><div class="line"></div><div class="line">    <span class="comment">/* Calculated HMAC-SHA-256*/</span></div><div class="line">    uint8_t hmac[<a class="code" href="group__group__cryptolite__macros.html#ga6d749f027df6aba958cdd1ec0cd4794b">CY_CRYPTOLITE_SHA256_HASH_SIZE</a>] = {0};</div><div class="line"></div><div class="line">    <a class="code" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> status;</div><div class="line">    <a class="code" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> hmac_ctx;</div><div class="line"></div><div class="line">    <span class="comment">/* MAC calculation */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#gab875d4c4c75ed427638cd0620010cbdb">Cy_Cryptolite_Hmac_Sha256_Init</a> (CRYPTOLITE, &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga43f4d2a8acdd5cd91edb1447f1dd69cf">Cy_Cryptolite_Hmac_Sha256_Start</a> (CRYPTOLITE, HMAC_SHA256_Vector0_Key0, <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Key0), &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga07427f880d0be9706ab3aa244f993f34">Cy_Cryptolite_Hmac_Sha256_Update</a> (CRYPTOLITE, &amp;HMAC_SHA256_Vector0_Msg0[0], 10u, &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga07427f880d0be9706ab3aa244f993f34">Cy_Cryptolite_Hmac_Sha256_Update</a> (CRYPTOLITE, &amp;HMAC_SHA256_Vector0_Msg0[10], <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Msg0)-10u, &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga903a1634c4aee19a657e7e446ad14f8e">Cy_Cryptolite_Hmac_Sha256_Finish</a> (CRYPTOLITE, hmac,  &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga8b177687d857c3c0ef0756ee6803285c">Cy_Cryptolite_Hmac_Sha256_Free</a> (CRYPTOLITE, &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div></div><!-- fragment --> </dd></dl>
<dl class="section note"><dt>Note</dt><dd>There is no alignment or size restriction for message buffer, However providing a four byte aligned buffer with size in multiple of <a class="el" href="group__group__cryptolite__macros.html#ga3e619d10f23972bfadebe5be18137f05">CY_CRYPTOLITE_SHA256_BLOCK_SIZE</a>, will result in best execution time. </dd></dl>

</div>
</div>
<a id="ga903a1634c4aee19a657e7e446ad14f8e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga903a1634c4aee19a657e7e446ad14f8e">&#9670;&nbsp;</a></span>Cy_Cryptolite_Hmac_Sha256_Finish()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Hmac_Sha256_Finish </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>hmac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *&#160;</td>
          <td class="paramname"><em>cfContext</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Completes the HMAC SHA256 calculation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTOLITE instance.</td></tr>
    <tr><td class="paramname">hmac</td><td>The address pointer to the calculated Hmac.</td></tr>
    <tr><td class="paramname">cfContext</td><td>The pointer to the cy_stc_cryptolite_context_hmac_sha_t structure that stores all internal variables for Cryptolite driver.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a></dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/* Key : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Key0[] = {0x6f,0x35,0x62,0x8d,0x65,0x81,0x34,0x35,0x53,0x4b,0x5d,0x67,0xfb,0xdb,0x54,0xcb,0x33,0x40,0x3d,0x04,0xe8,0x43,0x10,0x3e,0x63,0x99,0xf8,0x06,0xcb,0x5d,0xf9,0x5f,0xeb,0xbd,0xd6,0x12,0x36,0xf3,0x32,0x45};</div><div class="line"></div><div class="line"></div><div class="line">    <span class="comment">/* Message : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Msg0[]  = {0x75,0x2c,0xff,0x52,0xe4,0xb9,0x07,0x68,0x55,0x8e,0x53,0x69,0xe7,0x5d,0x97,0xc6,0x96,0x43,0x50,0x9a,0x5e,0x59,0x04,0xe0,0xa3,0x86,0xcb,0xe4,0xd0,0x97,0x0e,0xf7,0x3f,0x91,0x8f,0x67,0x59,0x45,0xa9,0xae,0xfe,0x26,0xda,0xea,0x27,0x58,0x7e,0x8d,0xc9,0x09,0xdd,0x56,0xfd,0x04,0x68,0x80,0x5f,0x83,0x40,0x39,0xb3,0x45,0xf8,0x55,0xcf,0xe1,0x9c,0x44,0xb5,0x5a,0xf2,0x41,0xff,0xf3,0xff,0xcd,0x80,0x45,0xcd,0x5c,0x28,0x8e,0x6c,0x4e,0x28,0x4c,0x37,0x20,0x57,0x0b,0x58,0xe4,0xd4,0x7b,0x8f,0xee,0xed,0xc5,0x2f,0xd1,0x40,0x1f,0x69,0x8a,0x20,0x9f,0xcc,0xfa,0x3b,0x4c,0x0d,0x9a,0x79,0x7b,0x04,0x6a,0x27,0x59,0xf8,0x2a,0x54,0xc4,0x1c,0xcd,0x7b,0x5f,0x59,0x2b,};</div><div class="line"></div><div class="line">    <span class="comment">/* Calculated HMAC-SHA-256*/</span></div><div class="line">    uint8_t hmac[<a class="code" href="group__group__cryptolite__macros.html#ga6d749f027df6aba958cdd1ec0cd4794b">CY_CRYPTOLITE_SHA256_HASH_SIZE</a>] = {0};</div><div class="line"></div><div class="line">    <a class="code" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> status;</div><div class="line">    <a class="code" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> hmac_ctx;</div><div class="line"></div><div class="line">    <span class="comment">/* MAC calculation */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#gab875d4c4c75ed427638cd0620010cbdb">Cy_Cryptolite_Hmac_Sha256_Init</a> (CRYPTOLITE, &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga43f4d2a8acdd5cd91edb1447f1dd69cf">Cy_Cryptolite_Hmac_Sha256_Start</a> (CRYPTOLITE, HMAC_SHA256_Vector0_Key0, <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Key0), &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga07427f880d0be9706ab3aa244f993f34">Cy_Cryptolite_Hmac_Sha256_Update</a> (CRYPTOLITE, &amp;HMAC_SHA256_Vector0_Msg0[0], 10u, &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga07427f880d0be9706ab3aa244f993f34">Cy_Cryptolite_Hmac_Sha256_Update</a> (CRYPTOLITE, &amp;HMAC_SHA256_Vector0_Msg0[10], <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Msg0)-10u, &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga903a1634c4aee19a657e7e446ad14f8e">Cy_Cryptolite_Hmac_Sha256_Finish</a> (CRYPTOLITE, hmac,  &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga8b177687d857c3c0ef0756ee6803285c">Cy_Cryptolite_Hmac_Sha256_Free</a> (CRYPTOLITE, &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga8b177687d857c3c0ef0756ee6803285c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8b177687d857c3c0ef0756ee6803285c">&#9670;&nbsp;</a></span>Cy_Cryptolite_Hmac_Sha256_Free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Hmac_Sha256_Free </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *&#160;</td>
          <td class="paramname"><em>cfContext</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears the used memory and context data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTOLITE instance.</td></tr>
    <tr><td class="paramname">cfContext</td><td>The pointer to the <a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> structure that stores all internal variables for Cryptolite driver.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a></dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/* Key : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Key0[] = {0x6f,0x35,0x62,0x8d,0x65,0x81,0x34,0x35,0x53,0x4b,0x5d,0x67,0xfb,0xdb,0x54,0xcb,0x33,0x40,0x3d,0x04,0xe8,0x43,0x10,0x3e,0x63,0x99,0xf8,0x06,0xcb,0x5d,0xf9,0x5f,0xeb,0xbd,0xd6,0x12,0x36,0xf3,0x32,0x45};</div><div class="line"></div><div class="line"></div><div class="line">    <span class="comment">/* Message : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Msg0[]  = {0x75,0x2c,0xff,0x52,0xe4,0xb9,0x07,0x68,0x55,0x8e,0x53,0x69,0xe7,0x5d,0x97,0xc6,0x96,0x43,0x50,0x9a,0x5e,0x59,0x04,0xe0,0xa3,0x86,0xcb,0xe4,0xd0,0x97,0x0e,0xf7,0x3f,0x91,0x8f,0x67,0x59,0x45,0xa9,0xae,0xfe,0x26,0xda,0xea,0x27,0x58,0x7e,0x8d,0xc9,0x09,0xdd,0x56,0xfd,0x04,0x68,0x80,0x5f,0x83,0x40,0x39,0xb3,0x45,0xf8,0x55,0xcf,0xe1,0x9c,0x44,0xb5,0x5a,0xf2,0x41,0xff,0xf3,0xff,0xcd,0x80,0x45,0xcd,0x5c,0x28,0x8e,0x6c,0x4e,0x28,0x4c,0x37,0x20,0x57,0x0b,0x58,0xe4,0xd4,0x7b,0x8f,0xee,0xed,0xc5,0x2f,0xd1,0x40,0x1f,0x69,0x8a,0x20,0x9f,0xcc,0xfa,0x3b,0x4c,0x0d,0x9a,0x79,0x7b,0x04,0x6a,0x27,0x59,0xf8,0x2a,0x54,0xc4,0x1c,0xcd,0x7b,0x5f,0x59,0x2b,};</div><div class="line"></div><div class="line">    <span class="comment">/* Calculated HMAC-SHA-256*/</span></div><div class="line">    uint8_t hmac[<a class="code" href="group__group__cryptolite__macros.html#ga6d749f027df6aba958cdd1ec0cd4794b">CY_CRYPTOLITE_SHA256_HASH_SIZE</a>] = {0};</div><div class="line"></div><div class="line">    <a class="code" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> status;</div><div class="line">    <a class="code" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> hmac_ctx;</div><div class="line"></div><div class="line">    <span class="comment">/* MAC calculation */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#gab875d4c4c75ed427638cd0620010cbdb">Cy_Cryptolite_Hmac_Sha256_Init</a> (CRYPTOLITE, &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga43f4d2a8acdd5cd91edb1447f1dd69cf">Cy_Cryptolite_Hmac_Sha256_Start</a> (CRYPTOLITE, HMAC_SHA256_Vector0_Key0, <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Key0), &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga07427f880d0be9706ab3aa244f993f34">Cy_Cryptolite_Hmac_Sha256_Update</a> (CRYPTOLITE, &amp;HMAC_SHA256_Vector0_Msg0[0], 10u, &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga07427f880d0be9706ab3aa244f993f34">Cy_Cryptolite_Hmac_Sha256_Update</a> (CRYPTOLITE, &amp;HMAC_SHA256_Vector0_Msg0[10], <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Msg0)-10u, &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga903a1634c4aee19a657e7e446ad14f8e">Cy_Cryptolite_Hmac_Sha256_Finish</a> (CRYPTOLITE, hmac,  &amp;hmac_ctx);</div><div class="line"></div><div class="line">     <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#ga8b177687d857c3c0ef0756ee6803285c">Cy_Cryptolite_Hmac_Sha256_Free</a> (CRYPTOLITE, &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gafa04cc27245c83173cfa78f0eb094832"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafa04cc27245c83173cfa78f0eb094832">&#9670;&nbsp;</a></span>Cy_Cryptolite_Hmac_Sha256_Run()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> Cy_Cryptolite_Hmac_Sha256_Run </td>
          <td>(</td>
          <td class="paramtype">CRYPTOLITE_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>keyLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>messageSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>hmac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> *&#160;</td>
          <td class="paramname"><em>cfContext</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function performs the HMAC SHA256 function. </p>
<p>Provide the required parameters and the pointer to the context structure when making this function call. It is independent of the previous Crypto state because it already contains preparation, calculation, and finalization steps.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTOLITE instance.</td></tr>
    <tr><td class="paramname">key</td><td>The pointer to the HMAC key.</td></tr>
    <tr><td class="paramname">keyLength</td><td>The length of the HMAC key.</td></tr>
    <tr><td class="paramname">message</td><td>The address pointer to a message whose hash value is being computed.</td></tr>
    <tr><td class="paramname">messageSize</td><td>The size of a message in bytes.</td></tr>
    <tr><td class="paramname">hmac</td><td>The address pointer to the hmac.</td></tr>
    <tr><td class="paramname">cfContext</td><td>The pointer to the <a class="el" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> structure that stores all internal variables for Cryptolite driver.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a></dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/* Key : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Key0[] = {0x6f,0x35,0x62,0x8d,0x65,0x81,0x34,0x35,0x53,0x4b,0x5d,0x67,0xfb,0xdb,0x54,0xcb,0x33,0x40,0x3d,0x04,0xe8,0x43,0x10,0x3e,0x63,0x99,0xf8,0x06,0xcb,0x5d,0xf9,0x5f,0xeb,0xbd,0xd6,0x12,0x36,0xf3,0x32,0x45};</div><div class="line"></div><div class="line"></div><div class="line">    <span class="comment">/* Message : */</span></div><div class="line">    <span class="keyword">const</span> uint8_t HMAC_SHA256_Vector0_Msg0[]  = {0x75,0x2c,0xff,0x52,0xe4,0xb9,0x07,0x68,0x55,0x8e,0x53,0x69,0xe7,0x5d,0x97,0xc6,0x96,0x43,0x50,0x9a,0x5e,0x59,0x04,0xe0,0xa3,0x86,0xcb,0xe4,0xd0,0x97,0x0e,0xf7,0x3f,0x91,0x8f,0x67,0x59,0x45,0xa9,0xae,0xfe,0x26,0xda,0xea,0x27,0x58,0x7e,0x8d,0xc9,0x09,0xdd,0x56,0xfd,0x04,0x68,0x80,0x5f,0x83,0x40,0x39,0xb3,0x45,0xf8,0x55,0xcf,0xe1,0x9c,0x44,0xb5,0x5a,0xf2,0x41,0xff,0xf3,0xff,0xcd,0x80,0x45,0xcd,0x5c,0x28,0x8e,0x6c,0x4e,0x28,0x4c,0x37,0x20,0x57,0x0b,0x58,0xe4,0xd4,0x7b,0x8f,0xee,0xed,0xc5,0x2f,0xd1,0x40,0x1f,0x69,0x8a,0x20,0x9f,0xcc,0xfa,0x3b,0x4c,0x0d,0x9a,0x79,0x7b,0x04,0x6a,0x27,0x59,0xf8,0x2a,0x54,0xc4,0x1c,0xcd,0x7b,0x5f,0x59,0x2b,};</div><div class="line"></div><div class="line">    <span class="comment">/* Calculated HMAC-SHA-256*/</span></div><div class="line">    uint8_t hmac[<a class="code" href="group__group__cryptolite__macros.html#ga6d749f027df6aba958cdd1ec0cd4794b">CY_CRYPTOLITE_SHA256_HASH_SIZE</a>] = {0};</div><div class="line"></div><div class="line">    <a class="code" href="group__group__cryptolite__enums.html#gafaeb3f2fb88784222220aee907e36710">cy_en_cryptolite_status_t</a> status;</div><div class="line">    <a class="code" href="structcy__stc__cryptolite__context__hmac__sha256__t.html">cy_stc_cryptolite_context_hmac_sha256_t</a> hmac_ctx;</div><div class="line"></div><div class="line">    <span class="comment">/* MAC calculation */</span></div><div class="line">    status = <a class="code" href="group__group__cryptolite__lld__mac__functions.html#gafa04cc27245c83173cfa78f0eb094832">Cy_Cryptolite_Hmac_Sha256_Run</a>(CRYPTOLITE,</div><div class="line">                                        HMAC_SHA256_Vector0_Key0,</div><div class="line">                                        <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Key0),</div><div class="line">                                        HMAC_SHA256_Vector0_Msg0,</div><div class="line">                                        <span class="keyword">sizeof</span>(HMAC_SHA256_Vector0_Msg0),</div><div class="line">                                        hmac,</div><div class="line">                                        &amp;hmac_ctx);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div></div><!-- fragment --> </dd></dl>
<dl class="section note"><dt>Note</dt><dd>There is no alignment or size restriction for message buffer, However providing a four byte aligned buffer with size in multiple of <a class="el" href="group__group__cryptolite__macros.html#ga3e619d10f23972bfadebe5be18137f05">CY_CRYPTOLITE_SHA256_BLOCK_SIZE</a>, will result in best execution time. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
